package com.smart.manager.pop.entities.models;

import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.member.entities.views.MemberView;
import com.smart.manager.pop.entities.views.ActivityMainView;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;

/**
 * C2C邀请达成记录
 *
 * @author Administrator
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@Accessors(chain = true)
public class PopC2cRecord extends BaseLongModel {

    @ApiModelProperty(value = "活动ID")
    @ManyToOne
    @JoinColumn(name = "activity", referencedColumnName = "id")
    private ActivityMainView activity;


    @ApiModelProperty(value = "邀请人")
    @ManyToOne
    @JoinColumn(name = "inviter", referencedColumnName = "id")
    private MemberView inviter;

    @ApiModelProperty(value = "参与人")
    @ManyToOne
    @JoinColumn(name = "actor", referencedColumnName = "id")
    private MemberView actor;


    @ApiModelProperty(value = "活动达成时间")
    private LocalDateTime achievedTime;

    @ApiModelProperty(value = "奖励属性")
    private Boolean prizeAttr;

    @ApiModelProperty(value = "邀请人的注册序号")
    private Integer xh;



}
